<template>
  <el-switch
    v-model="model"
    :active-text="activeText"
    :inactive-text="inactiveText"
    :disabled="disabled"
    inline-prompt
    class="axiom-switch"
    v-bind="$attrs"
    @change="$emit('change', $event)"
  />
</template>

<script setup>
import { computed } from 'vue';

defineOptions({
  name: 'AxiomSwitch'
});

const props = defineProps({
  modelValue: [Boolean, String, Number],
  activeText: String,
  inactiveText: String,
  disabled: Boolean,
});

const emit = defineEmits(['update:modelValue', 'change']);

const model = computed({
  get: () => props.modelValue,
  set: (value) => emit('update:modelValue', value),
});
</script> 